﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.Data {
   
    public partial class TokenStatisticsMap
    : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<TokenStatistics> {
        public TokenStatisticsMap() {
            ToTable("mc_TokenStatistics", "dbo");

            HasKey(t => t.Id);
            Property(t => t.Id)
                .HasColumnName("Id")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(t => t.ConfirmProfit)
           .HasColumnName("ConfirmProfit")
            .HasPrecision(18, 6)
           .IsRequired();
            Property(t => t.UnConfirmProfit)
           .HasColumnName("UnConfirmProfit")
            .HasPrecision(18, 6)
           .IsRequired();
            Property(t => t.FrozenProfit)
        .HasColumnName("FrozenProfit")
         .HasPrecision(18, 6)
        .IsRequired();
            HasRequired(t => t.Merchant)
             .WithMany()
             .HasForeignKey(d => d.MerchantId)
             .WillCascadeOnDelete(false);
        }
    }
}
